#ifndef IT_H
#define IT_H
#include <stdint.h>

#define IT_PRESENT	(0x8000)
#define IT_DPL0		0
#define IT_DPL1		(1<<13)
#define IT_DPL2		(2<<13)
#define IT_DPL3		(3<<13)

typedef struct __attribute__ ((__packed__)) __attribute__ ((aligned(16))){
	uint16_t	limit;
	uint32_t	address;
}volatile titp;

typedef struct __attribute__ ((__packed__)){
	uint16_t	offset_low;
	uint16_t	selector;
	uint16_t	attr;
	uint16_t	offset_high;
}volatile titr;

titr* it_clear(unsigned int address, unsigned int count);
void it_set(titr *ir, uint32_t index, uint32_t offset, uint16_t selector, uint16_t attr);
void it_on(titr*);
#endif

